<template>
    <el-dialog v-model="isShow" v-bind="$attrs" title="用户信息修改" :close-on-click-modal="false">
        <!--  -->
        <p>内容:</p>
        <!--  -->
        <template #footer>
            <span>
                <el-button @click="closeDailog()">取消</el-button>
                <el-button type="primary" @click="execCallback()">更新</el-button>
            </span>
        </template>
    </el-dialog>
</template>

<script>
export default {
    props:["model-value"],
    emits:["update:model-value","reload"],
    computed: {
        isShow:{
            get(){
                return this.modelValue;
            },
            set(nv){
                this.$emit("update:model-value",nv)
            }
        }
    },
    methods: {
        closeDailog(){
            // 额外操作
            
            this.$emit("update:model-value",false)
        },
        async execCallback() {
            // 异步请求

            // 失败

            // 成功
            this.$emit("update:model-value",false)
            // 当前dailog的一些内容变量需要清空
            
            // 完成页面数据的更新
            this.$emit("reload")
        }
    },
}
</script>

<style lang="scss" scoped></style>